package com.jingdogn.entity;

import org.springframework.data.elasticsearch.annotations.Document;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Map;

@Document(indexName = "good", type = "goods")//加上了@Document注解之后，默认情况下这个实体中所有的属性都会被建立索引、并且分词
public class Good implements Serializable {

    @Id
    private String id;

    private String url;

    private Map<String, String> goodMap;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Map<String, String> getGoodMap() {
        return goodMap;
    }

    public void setGoodMap(Map<String, String> goodMap) {
        this.goodMap = goodMap;
    }
}
